version: "3"
services:
  #PHP Service
  app:
    image: ${REGISTRY}/${PROJECT}:${IMAGE_TAG}
    container_name: "${PROJECT}_APP"
    restart: unless-stopped
    tty: true
    environment:
      SERVICE_NAME: app
      SERVICE_TAGS: dev
    working_dir: /var/www
    volumes:
      - ./:/var/www
      - ./php/php.ini:/usr/local/etc/php/conf.d/local.ini
    networks:
      - "${PROJECT}network"

  #Nginx Service
  webserver:
    image: nginx:alpine
    container_name: "${PROJECT}_NGINX"
    restart: unless-stopped
    tty: true
    ports:
      - "${PORT}:80"
    volumes:
      - ./:/var/www
      - ./nginx/conf.d/:/etc/nginx/conf.d/
    networks:
      - "${PROJECT}network"

#Docker Networks
networks:
  "${PROJECT}network":
    driver: bridge
